package bsh.compilation;

public class MethodDeclarationTest1 extends AbstractCompilationTestCase {

    public void testSimple() throws Exception {
        Object r = this.execute("int main() { return  1; }; main();");
        assertEquals(1, r);
    }

    public void testWithParam() throws Exception {
        Object r = this.execute("int main(int i) { return i; }; main(2);");
        assertEquals(2, r);
    }

    public void testWithUndeclaredReturn() throws Exception {
        Object r = this.execute("main(int i) { return i; }; main(2);");
        assertEquals(2, r);
    }

    public void testWithUndeclaredReturnAndParam() throws Exception {
        Object r = this.execute("main(i) { return i; }; main(2);");
        assertEquals(2, r);
    }

}
